// module configs
includeConfig "../../conf/modules/fastqc.config"
includeConfig "../../conf/modules/trimgalore.config"
includeConfig "../../conf/modules/multiqc.config"
includeConfig "../../conf/modules/preseq_lcextrap.config"
includeConfig "../../conf/modules/qualimap_bamqc.config"

// subworkflow configs
includeConfig "../../conf/subworkflows/fasta_index_bismark_bwameth.config"
includeConfig "../../conf/subworkflows/fastq_align_dedup_bismark.config"
includeConfig "../../conf/subworkflows/fastq_align_dedup_bwameth.config"

process {

    publishDir = [
        path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" },
        mode: params.publish_dir_mode,
        saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
    ]

}
